vt-d: Fixpanic in msi_msg_read_remap_rte with acpi=off
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 16 Oct 2009 07:28:47 +0000 (08:28 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 16 Oct 2009 07:28:47 +0000 (08:28 +0100)
commit4cf3febf20b3e6e910e5ee243471a55301ba64a5
tree554b022bd1ab505d31c152700144c667c0026d3f
parentc5ff46d8d46a97bf0d491d226f5092f698ffff96
vt-d: Fixpanic in msi_msg_read_remap_rte with acpi=off

Xen panics when "acpi=off noacpi" is set. Problem is caused by
dereferencing NULL pointer in drhd after calling
acpi_find_matched_drhd_unit. As acpi_find_matched_drhd_unit can
return NULL, checks has to be done before returned value is used.

From: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c